package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Users generated by hbm2java
 */
@Entity
@Table(name="users"
    ,catalog="madr_bd10"
    , uniqueConstraints = @UniqueConstraint(columnNames="name_user_usr") 
)
public class Users  implements java.io.Serializable {


     private Integer idUsr;
     private String nameUserUsr;
     private String passwordUsr;
     private Integer statusUsr;
     private Set userEntities = new HashSet(0);
     private Set usersProfileses = new HashSet(0);

    public Users() {
    }

	
    public Users(String nameUserUsr, String passwordUsr, Integer statusUsr) {
        this.nameUserUsr = nameUserUsr;
        this.passwordUsr = passwordUsr;
        this.statusUsr = statusUsr;
    }
    public Users(String nameUserUsr, String passwordUsr, Integer statusUsr, Set userEntities, Set usersProfileses) {
       this.nameUserUsr = nameUserUsr;
       this.passwordUsr = passwordUsr;
       this.statusUsr = statusUsr;
       this.userEntities = userEntities;
       this.usersProfileses = usersProfileses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_usr", unique=true, nullable=false)
    public Integer getIdUsr() {
        return this.idUsr;
    }
    
    public void setIdUsr(Integer idUsr) {
        this.idUsr = idUsr;
    }
    
    @Column(name="name_user_usr", unique=true, nullable=false, length=120)
    public String getNameUserUsr() {
        return this.nameUserUsr;
    }
    
    public void setNameUserUsr(String nameUserUsr) {
        this.nameUserUsr = nameUserUsr;
    }
    
    @Column(name="password_usr", nullable=false, length=120)
    public String getPasswordUsr() {
        return this.passwordUsr;
    }
    
    public void setPasswordUsr(String passwordUsr) {
        this.passwordUsr = passwordUsr;
    }
    
    @Column(name="status_usr", nullable=false)
    public Integer getStatusUsr() {
        return this.statusUsr;
    }
    
    public void setStatusUsr(Integer statusUsr) {
        this.statusUsr = statusUsr;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="users")
    public Set getUserEntities() {
        return this.userEntities;
    }
    
    public void setUserEntities(Set userEntities) {
        this.userEntities = userEntities;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="users")
    public Set getUsersProfileses() {
        return this.usersProfileses;
    }
    
    public void setUsersProfileses(Set usersProfileses) {
        this.usersProfileses = usersProfileses;
    }




}


